package dsx.iot;

import java.util.concurrent.ConcurrentHashMap;

public class IotPipeContext {
    private static ConcurrentHashMap<Long, Object> pipeMap = new ConcurrentHashMap<>();

    public static void set(Object object) {
        try {
            pipeMap.put(Thread.currentThread().getId(), object);
        } catch (Exception ex) {
        }
    }

    public static Object get() {
        try {
            return pipeMap.get(Thread.currentThread().getId());
        } catch (Exception ex) {
            return null;
        }
    }

}
